package com.hmall.common.client;

import com.hmall.common.dto.Item;
import com.hmall.common.dto.PageDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author Azer
 * @LOVE,,,
 * @Date 2021/11/7 19:48
 */
@FeignClient(name = "itemservice")
public interface ItemClient {


    @GetMapping("/item/list")
     PageDTO<Item> PageResult(@RequestParam(value = "page", defaultValue = "1") Integer page,
                                    @RequestParam(value = "size", defaultValue = "1") Integer size);


    @GetMapping("/item/{id}")
     Item QueryById(@PathVariable("id") Long id );
}
